0 On Ziv ’ s rounding test
نویسندگان
چکیده
A very simple test, introduced by Ziv, allows one to determine if an approximation to the value f(x) of an elementary function at a given point x suffices to return the floating-point number nearest f(x). The same test may be used when implementing floating-point operations with input and output operands of different formats, using arithmetic operators tailored for manipulating operands of the same format. That test depends on a “magic constant” e. We show how to choose that constant e to make the test reliable and efficient. Various cases are considered, depending on the availability of an fma instruction, and on the range of f(x).
منابع مشابه
Investigating the effect of rounding and revision in predicting earnings per share on investors' attention
Because in the theory of economics, the value of a company is based on the current value of future cash flows and profit is used as a substitute for cash flows, profit forecasting is of particular importance. In the research, the effect of rounding and revision in predicting earnings per share on the investors' attention in Iran has been investigated. After designing the investors' attention as...
متن کاملSolving Range Constraints for Binary Floating-Point Instructions
We present algorithms that solve the following problem: given three ranges of floating-point numbers Rx, Ry , Rz , a floating-point operation (op), and a rounding-mode (round), generate three floating-point numbers x̄, ȳ, z̄ such that x̄ ∈ Rx, ȳ ∈ Ry , z̄ ∈ Rz , and z̄ = round(x̄ op ȳ). This problem, although quite simple when dealing with intervals of real numbers, is much more complex when consider...
متن کاملSharp ULP rounding error bound for the hypotenuse function
The hypotenuse function, z = √ x2 + y2, is sometimes included in math library packages. Assuming that it is being computed by a straightforward algorithm, in a binary floating point environment, with round to nearest rounding mode, a sharp roundoff error bound is derived, for arbitrary precision. For IEEE single precision, or higher, the bound implies that |z − z| < 1.222 ulp(z) and |z − z| < 1...
متن کاملTools for the Design of Reliable and Efficient Functions Evaluation Libraries. (Outils pour la conception de bibliothèques de calcul de fonctions efficaces et fiables)
The design of function evaluation libraries is a complex task that requires a great care and dedication, especially when one wants to satisfy high standards of reliability and performance. In actual practice, it cannot be correctly performed, as a routine operation, without tools that not only help the designer to find his way in a complex and extended solution space but also to guarantee that ...
متن کاملFast Lempel-Ziv Decompression in Linear Space
We consider the problem of decompressing the Lempel-Ziv 77 representation of a string S ∈ [σ] using a working space as close as possible to the size z of the input. The folklore solution for the problem runs in optimal O(n) time but requires random access to the whole decompressed text. A better solution is to convert LZ77 into a grammar of size O(z log(n/z)) and then stream S in optimal linear...
متن کامل